package com.oba.king.businessprocess.storagemanage.outstorage;
/**
 * Title:           OutStoragePrdt
 * Description:
 * Copyright:       Copyright (c) 2010
 * Company:         King Top Limited
 * @author          Wu Liang
 * @version 1.0
 *
 * MODIFICATION HISTORY
 * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 * Date Modified        Modified By         Comments
 * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 * 24/05/2010           Wu Liang            Code Creation
 */
import java.io.Serializable;

import com.oba.base.service.BaseBo;
import com.oba.king.businessprocess.storagemanage.instorage.InStoragePrdt;
import com.oba.king.datalib.productinfo.ProductInfo;

public class OutStoragePrdt extends BaseBo implements Serializable{

	private OutStorage outStorage;//出库单id
	private ProductInfo productInfo;//药品id
	private Long outAmount;//药品数量
	private String measureUnit;//药品单位
	private Double unitPrice;//药品价格
	private Double totalSum;//总金额
	
	public Long getId() {
		return outStorage.getOutStorageId();
	}

	public String getName() {
		return outStorage.getOutStorageCode();
	}

	public boolean equals(Object obj) {
		if(!(obj instanceof OutStoragePrdt)) {
			return false;
		}
		OutStoragePrdt ipl = (OutStoragePrdt) obj;
		if(this.outStorage.getOutStorageId() == null || this.productInfo.getProductId() == null || ipl.outStorage.getOutStorageId() == null || ipl.productInfo.getProductId() == null) {
			return false;
		} else if(this.outStorage.getOutStorageId().equals(ipl.outStorage.getOutStorageId()) && this.productInfo.getProductId().equals(ipl.productInfo.getProductId())) {
			return true;
		} else {
			return false;
		}
	}
	
	public OutStorage getOutStorage() {
		return outStorage;
	}

	public void setOutStorage(OutStorage outStorage) {
		this.outStorage = outStorage;
	}

	public ProductInfo getProductInfo() {
		return productInfo;
	}

	public void setProductInfo(ProductInfo productInfo) {
		this.productInfo = productInfo;
	}

	public Long getOutAmount() {
		return outAmount;
	}

	public void setOutAmount(Long outAmount) {
		this.outAmount = outAmount;
	}

	public String getMeasureUnit() {
		return measureUnit;
	}

	public void setMeasureUnit(String measureUnit) {
		this.measureUnit = measureUnit;
	}

	public Double getUnitPrice() {
		return unitPrice;
	}

	public void setUnitPrice(Double unitPrice) {
		this.unitPrice = unitPrice;
	}

	public Double getTotalSum() {
		return totalSum;
	}

	public void setTotalSum(Double totalSum) {
		this.totalSum = totalSum;
	}

}
